<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button type="button" onclick="testPost()">POST</button>
	</body>
	<script type="text/javascript">
		function testPost(){
			var ajax = new XMLHttpRequest();
			ajax.open('POST','https://api.apiopen.top/loginUser')			
		ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded')
			ajax.send('apikey=d0058f79caae5300dcba65f128e52855&name=peakchao&passwd=123456')
			ajax.onreadystatechange = function(){
				if(ajax.readyState==4 && ajax.status==200){
					var obj = JSON.parse(ajax.responseText);
					console.log(obj);
					alert(obj.desc)
				}
			}	
		}
	</script>
</html>
